﻿<include file='Admin/Tpl/Public/nav.html' />
<style>
	.use,a{cursor:pointer}
</style>			
<div class="sidebar-right sidebar-nicescroller">
    <div class="tab-content">
      <div class="tab-pane fade in active" id="online-user-sidebar">
        <ul class="sidebar-menu online-user">
            <li class="static">ONLINE USERS</li>
            <li><a href="#fakelink">
                <span class="user-status success"></span>
                <img src="assets/img/avatar/avatar-2.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-mobile-phone device-status"></i>
                Thomas White 
                <span class="small-caps">Lorem ipsum dolor sit amet, consectetuer adipiscing elit</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status success"></span>
                <img src="assets/img/avatar/avatar-3.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Doina Slaivici
                <span class="small-caps">Duis autem vel eum iriure dolor in hendrerit in </span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status success"></span>
                <img src="assets/img/avatar/avatar-4.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-android device-status"></i>
                Harry Nichols
                <span class="small-caps">I think so</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status success"></span>
                <img src="assets/img/avatar/avatar-5.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-mobile-phone device-status"></i>
                Mihaela Cihac
                <span class="small-caps">Yes, I'll be waiting</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status success"></span>
                <img src="assets/img/avatar/avatar-6.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-apple device-status"></i>
                Harold Chavez
                <span class="small-caps">Thank you!</span>
            </a></li>
            
            <li class="static">IDLE USERS</li>
            <li><a href="#fakelink">
                <span class="user-status warning"></span>
                <img src="assets/img/avatar/avatar-7.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-windows device-status"></i>
                Elizabeth Owens
                <span class="small-caps">2 hours</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status warning"></span>
                <img src="assets/img/avatar/avatar-8.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-apple device-status"></i>
                Frank Oliver
                <span class="small-caps">4 hours</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status warning"></span>
                <img src="assets/img/avatar/avatar-9.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Mya Weastell
                <span class="small-caps">15 minutes</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status warning"></span>
                <img src="assets/img/avatar/avatar-10.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-mobile-phone device-status"></i>
                Carl Rodriguez
                <span class="small-caps">20 hours</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status warning"></span>
                <img src="assets/img/avatar/avatar-11.jpg" class="ava-sidebar img-circle" alt="Avatar">
                <i class="fa fa-mobile-phone device-status"></i>
                Nikita Carter
                <span class="small-caps">2 minutes</span>
            </a></li>
            
            <li class="static">OFFLINE USERS</li>
            <li><a href="#fakelink">
                <span class="user-status danger"></span>
                <img src="assets/img/avatar/avatar-12.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Craig Dixon
                <span class="small-caps">Last seen 2 hours ago</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status danger"></span>
                <img src="assets/img/avatar/avatar-13.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Mikayla King
                <span class="small-caps">Last seen yesterday</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status danger"></span>
                <img src="assets/img/avatar/avatar-14.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Richard Dixon
                <span class="small-caps">Last seen Feb 20, 2014 05:45:50</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status danger"></span>
                <img src="assets/img/avatar/avatar-15.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Brenda Fuller
                <span class="small-caps">Last seen Feb 15, 2014 11:35:50</span>
            </a></li>
            <li><a href="#fakelink">
                <span class="user-status danger"></span>
                <img src="assets/img/avatar/avatar-16.jpg" class="ava-sidebar img-circle" alt="Avatar">
                Ryan Ortega
                <span class="small-caps">Last seen Jan 20, 2014 03:45:50</span>
            </a></li>
        </ul>
      </div>
    </div><!-- /.tab-content -->
</div><!-- /.sidebar-right -->
<!-- END SIDEBAR RIGHT -->



<!-- BEGIN PAGE CONTENT -->
<div class="page-content">
    
    
    <div class="container-fluid">
        <!-- Begin page heading -->
        <h1 class="page-heading">Team In　<small>公司会议室管理</small></h1>
        <!-- End page heading -->
    
        <!-- Begin breadcrumb -->
        <ol class="breadcrumb default square rsaquo sm">
            <li><a href="index.html"><i class="fa fa-home"></i></a></li>
            <li><a href="#fakelink">Teamin</a></li>
            <li class="active">会议室列表</li>
        </ol>

        <div id="div_box">
            <div class="btn-group groups">
                        <a href="__URL__/forAct" class="btn btn-success"><i class="fa fa-plus"></i> 添加新的会议室</a>
                    </div>
                    <div class="btn-group groups">
                        <span type="button" class="btn btn-danger">会议室列表</span>
                    </div>
<!--会议室搜索<-->
            　<span>搜索：</span> 
            <div class="btn-group">
                <button type="button" class="btn btn-default city_check" name="1">城市选择</button>
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>							
                </button>
                <ul class="dropdown-menu" role="menu">
                <foreach name="city" item="value">
                    <li><a class="city room_check" name="{$value.local_id}">{$value.local_name}</a></li>
                </foreach>
                </ul>
            </div>								
<!--座位数-->
            <div class="btn-group">
                <button type="button" class="btn btn-primary seats_check" name="lt_5000">座位数</button>
                <button type="button" class="btn btn-primary active dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>									
                </button>
                <ul class="dropdown-menu primary" role="menu">
                    <li><a class="seats room_check" name="lt_50">50以下</a></li>
                    <li><a class="seats room_check" name="egt_50_lt_100">50~100</a></li>
                    <li><a class="seats room_check" name="egt_100_lt_200">100~200</a></li>
                    <li><a class="seats room_check" name="egt_200_lt_500">200~500</a></li>
                    <li><a class="seats room_check" name="egt_500">500以上</a></li>								
                </ul>
            </div>
<!-- 会议室配置 -->
            <div class="btn-group">
                <button id="0" type="button" class="btn btn-success installation_check" name="room_no">配置</button>
                <button type="button" class="btn btn-success active dropdown-toggle" data-toggle="dropdown">
                    <span class="caret"></span>
                </button>
                <ul class="dropdown-menu success" role="menu">
                    <li><a class="installation room_check" name="room_haveProjector">投影</a></li>
                    <li><a class="installation room_check" name="room_haveWifi">wifi</a></li>								
                </ul>
            </div>
<!--会议室搜索结束-->
            <!-- End breadcrumb -->
            <div id="box_ajax">
                <foreach name="data" key="key" item="value">
                    <div class="the-box no-border store-list">							
                        <div class="media">			                            
                                    <div class="clearfix visible-xs"></div>			                            
                                    <div class="media-body">		                              
                                        <h4 class="media-heading">
                                          <a href="#fakelink"><strong>{$room[$value['room_id']]['room_name']}</strong> 
                                          <span class="label label-info pull-right">会议室座位数：{$room[$value['room_id']]['room_allSeats']}个座位</span>
                                          </a>
                                        </h4>
                                        <ul class="list-inline">
                                            <li><a href="#fakelink">会议室地址</a></li>
                                            <li style="list-style: none">|</li>
                                            <li>【{$room[$value['room_id']]['local_name']}】{$room[$value['room_id']]['building_name']}{$room[$value['room_id']]['floor_name']}</li>
                                        </ul>
                                        <ul class="list-inline">
                                            <li><a href="#fakelink">会议室配置</a></li>
                                            <li style="list-style: none">|</li>
                                            <li><span class="label label-danger">投影设备／{$room[$value['room_id']]['room_haveProjector']==0?"无":"有"}</span>
                                            <span class="label label-success">wifi设备／{$room[$value['room_id']]['room_haveWifi']==0?"无":"有"}</span></li>
                                        </ul>
                                        <ul class="list-inline hidden-xs">
                                            <li><a href="#fakelink">会议室描述：</a></li>
                                        </ul>
                                        <p class="hidden-xs" style="text-indent:2em">			                                
                                            {$room[$value['room_id']]['room_description']==""?"暂无":$room[$value['room_id']]['room_description']}
                                        </p> 

                                <span style="background:#8CC152" name="{$value.room_id}" class="save use label label-danger">修改</span>
                                <span id="{$value.room_id}" class="delete use label label-danger">删除</span>
                                    </div><!-- /.media-body -->							

                                </div><!-- /.media -->
                            
                    </div><!-- /.the-box no-border -->					
                </foreach>
                <ul class="pagination success">{$show}</ul>
            </div>
        </div>

    </div><!-- /.container-fluid -->
    
    
    
    <!-- BEGIN FOOTER -->
    <footer>
        <!-- &copy; 2014 <a href="#fakelink">Your company</a><br />
        Design by <a href="http://isohdesign.com" target="_blank">ids</a>. Purchase this item at <a href="http://goo.gl/wSCjxD" target="_blank">Themeforest</a> -->
    </footer>
    <!-- END FOOTER -->
    
    
</div>
</div>


</body>

<script type="text/javascript">
$(".current").css({background:"#8CC152",color:"white"});
//搜索

$(".city").click(function(){
var local_id =$(this).attr("name");
var local_name = $(this).text();
var name = $(".installation_check").attr("name");		
var room_allSeats = $(".seats_check").attr("name");
$(".city_check").attr({"name":local_id});
$(".city_check").text(local_name);

$.ajax({
url:"__URL__/search",
data:{"local_id":local_id,"room_allSeats":room_allSeats,"name":name},
type:"post",
success:function(data){
    $("#box_ajax").html(data);

    
}

});

});

$(".seats").click(function(){
var local_id =$(".city_check").attr("name");		
var room_allSeats = $(this).attr("name");
var name = $(".installation_check").attr("name");		
$(".seats_check").attr({"name":room_allSeats});
$(".seats_check").text($(this).text());		
$.ajax({
url:"__URL__/search",
data:{"local_id":local_id,"room_allSeats":room_allSeats,"name":name},
type:"post",
success:function(data){
    $("#box_ajax").html(data);
}

});

});

$(".installation").click(function(){
var local_id =$(".city_check").attr("name");		
var room_allSeats = $(".seats_check").attr("name");
var name = $(this).attr("name");

$(".installation_check").attr({"name":name});
$(".installation_check").text($(this).text());
$.ajax({
url:"__URL__/search",
data:{"local_id":local_id,"room_allSeats":room_allSeats,"name":name},
type:"post",
success:function(data){
    $("#box_ajax").html(data);
}

});

});

//搜索结束
//删除
$(".delete").on("click",function(){
var id = $(this).attr("id");       
if(confirm("确认删除?")){
$.ajax({
url:"__URL__/delAct",
data:{"room_id":id},
type:"post",
dataType:"json",
success:function(data){
    alert(data);
   window.location="__SELF__";

}
})
}
});

//修改
$(".save").on("click",function(){
var id = $(this).attr("name");

$.ajax({
url:"__URL__/to_update",
data:{"room_id":id},
type:"post",
success:function(data){
   $("#div_box").html(data);
}
})

});
</script>

</html>
